package com.zengqingfa.designpattern.behavior.chain;

import com.zengqingfa.designpattern.behavior.chain.common.PreparationList;

/**
 * @author zengqingfa
 * @className Test
 * @description
 * @create 2022/10/6 13:01
 */
public class Test {

    public static void main(String[] args) {
        PreparationList preparationList = new PreparationList();
        preparationList.setWashFace(true);
        preparationList.setWashHair(false);
        preparationList.setHaveBreakfast(true);

        Study study = new Study();

        AbstractPrepareFilter haveBreakfastFilter = new HaveBreakfastFilter(null);
        AbstractPrepareFilter washFaceFilter = new WashFaceFilter(haveBreakfastFilter);
        AbstractPrepareFilter washHairFilter = new WashHairFilter(washFaceFilter);

        washHairFilter.doFilter(preparationList, study);
    }
}